Integrated optimization of urban rail transit line planning, timetabling and rolling stock scheduling

Urban rail transit train operation plan is a comprehensive production plan encompassing line planning, timetabling, and rolling stock scheduling. In order to solve the problem of infeasibility of the line plan and timetable because the number of rolling stocks could be only precisely considered in the rolling stock scheduling. An integrated optimization solution is proposed which considers the line plan, timetable, and rolling stock schedule. Candidate service routes are generated according to the layout of the turn-back stations. Considering the constraints of operation and passenger flow demand, an integer nonlinear programming model is established to minimize the cost of operation and passenger waiting time. The model complexity is analyzed and based on its decomposability a deterministic search algorithm is designed. Taking Chongqing Metro Line 3 in China as an example to verify the effectiveness of the proposed model and algorithm. Compared with the train operation plan based on manual experience and compiled by stages, the integrated optimization model can better improve the quality of train operation plan.


Introduction
Urban rail transit has become one of the most effective ways to relieve traffic congestion because of its environmental protection, punctuality, and efficient transportation characteristics [1,2]. The train operation plan of urban rail transit organizes train operation internally and provides transport service externally [3]. Its quality directly affects the efficiency of train transportation organization. In the process of train operation planning, operation planners usually consider both the operating enterprises and passengers [4]. From the perspective of operation enterprises, they are mainly concerned about the safety, efficiency, cost of train operation, and the difficulty of operation organization. From the perspective of passengers, high-quality and convenient transportation services should be provided. For example, the travel time and the load factor of trains should be reduced. Passengers usually hope to make train operation plans with full-length service route and high frequency to improve travel efficiency, but such train operation organization measures would increase the number of trains, which leads to an increase in operation costs. Therefore, how to balance the operating cost and passenger service level is the key to optimizing the train operation plan of urban rail transit. As a key technical document underpinning the operation of urban rail transit services, train operation plan mainly includes line plan, timetable, and rolling stock schedule [5]. Owing to the inherent complexity of the urban rail traffic system, the urban rail transit planning process shown in Fig 1 is usually hierarchically divided into several stages to reduce computational complexity. Line planning is a key operational problem which must be solved by metro operating company from the strategic level. Based on the capacity of line fixed facilities and equipment and passenger flow demand, it is a problem to determine train service routes, train composition, and frequency of each service route during the study period. Then, taking the output of the line planning problem as the input, the timetabling problem focuses on optimizing the arrival and departure time of each train at the station on the railway line. Finally, based on the arrival and departure time of trains, the rolling stock scheduling determines the circulation sequence and time of trains at the turn-back stations. Significantly, timetabling and rolling stock scheduling affect each other. The timetable can be adjusted by altering the circulation sequence and time of trains at the turn-back stations.
The train operation planning problem is divided into the above three subproblems for optimization to improve the solving efficiency [6]. These three subproblems are correlated, and the solution of one subproblem will limit the optimality of the next subproblem in the process of stepwise optimization. In addition, the calculation of passenger travel cost and operating cost often relies on the solution of multiple subproblems, rather than a single subproblem. Taking passenger waiting time as an example, it depends not only on the train running frequency obtained in the line planning subproblem, but also on the arrival and departure time of each train obtained by solving the timetabling subproblem. Similarly, the operating cost of an enterprise is not only related to the train service route determined by the line planning subproblem, but also related to the number of rolling stocks determined by the rolling stock scheduling subproblem. In a word, it is necessary to make the three subproblems of line planning, timetabling, and rolling stock scheduling as an inter-connected whole, and achieve their integrated optimization.
More and more scholars have noticed the importance of integrated optimization of all stages of train operation plan. Yan and Goverde [7] studied line planning and timetabling integration optimization of high-speed railway. Wang et al. [8] discussed the relationship between frequency of train service routes and train scheduling. Blanco further studies the integrated optimization of line planning and timetabling with short-turn service routes. Schöbel [5] proposed an eigenmodel of route planning, timetabling, and rolling stock scheduling for public transportation. Zhou and Mehdi [6] extended the generalized model to urban rail transit, but it only considered the operation organization of the full-length service route and the special situation of a single depot layout. Although the existing studies provide a good reference for the integrated optimization of urban rail transit train operation plan, there are few studies on integrated optimization considering line plan, train timetable, and rolling stock schedule. With the extension of the line, the multiple service routes and multiple train compositions gradually become the main train operation organization mode in the actual operation process. To fill the gap between theoretical research and practical application, this study also needs to further consider the actual operation situation of multiple routes and multiple train compositions, the restriction of the fleet size used on the train operation plan, and the limitation of the train's turn-back running at the turn-back station. The research focus of this paper is as follows: • This paper takes the train operation plan during the morning peak period as the research object and generates the candidate service routes according to the layout of the turn-back station on the line. To fill the gap in the integrated optimization of line planning, train timetable, and rolling stock schedule, concepts of the running offset of opposite trains and train running standard station are introduced to realize the coupling among line planning variables, train timetable variables, and rolling stock schedule variables.
• Based on the capacity of line fixed facilities and fleet size, this paper establishes a general integer nonlinear programming model for the integration optimization of train operation plan, aiming at minimizing the operation cost and passenger waiting time cost. The model is general since it considers the operation organization strategy of multiple service routes and multiple train compositions.
• A tailored and easy to implement deterministic search algorithm is developed to solve instances efficiently. It starts from the easily available feasible solution, and iteratively solves the three sub-models in a certain search range with a fixed step size. With a reasonable parameter setting, the algorithm can be used to find optimal or near-optimal solutions for instances within acceptable computation time.
• This research demonstrates the effectiveness of the integrated model by comparing the optimization results of the model with the train operation plan compiled based on manual experience in terms of operating cost and passenger service level. In addition, the sensitivity analysis is carried out for the fleet size, the maximum number of service routes operated by the line, and the weight coefficient of the objective function, which proves the practicability and reliability of the integrated model.
The remainder of this paper is organized as follows. First, a brief literature review is presented. Second, the problem is described. Third, the integrated optimization model of line planning, timetabling, and rolling stock scheduling is formulated. Fourth, a deterministic search algorithm is developed. Fifth, based on case studies on a real-world metro line, the effectiveness of the proposed model is discussed. Finally, the main conclusions are summarized.

Literature review
In a sense, the train service design of an urban rail transit line is like the line planning of highspeed railways. Based on the capacity of line equipment, both take passenger flow as input to determine the train routes and frequencies [9][10][11]. Sun et al. [12] constructed a frequency optimization model aiming at maximizing the train load rate while minimizing the number of trains. Niu et al. [13] built an optimization model of unbalanced train operation scheme in crowded environment. Taking passengers' choice into consideration, Li et al. [14] established a model of line planning for Y-type line. However, the above studies did not consider the unbalanced distribution of passenger flow in each station of the line. To solve this problem, Deng et al. [15] built an urban rail transit line plan optimization model aiming for the minimum generalized travel cost of passengers, the lowest operating cost of enterprises, and the least number of operating hours, and short-turn service routes are considered in the model. Xu et al. [16] built an optimization model of line planning based on passenger flow demand which considered short-turn routing mode. To further improve the level of passenger service, the train operation organization including multiple train compositions has been paid more and more attention. Li et al. [4] built a train service design model with multiple routes and multiple train compositions under capacity constraint.
In general, the problem of timetabling can be divided into cyclic and non-cyclic. Most studies on the cyclic train timetabling problem are based on periodic event scheduling problem (PESP) modeling framework. Liebchen [17], optimized the cyclic train schedule of the Berlin Metro to minimize the waiting time for passenger transfers. Zhang et al. [18] constructed an integer linear programming model for the cyclic train timetabling problem through the spacetime network and used the ADMM algorithm to solve it. Based on the PESP model, numerous new models have been developed for practical cyclic train timetabling problems, including capacity evaluation [19] and robust train timetables [20]. For the non-cyclic train timetabling problem, Higgins et al. [21] used the big M method to model the traffic conflict between trains. Zhou et al. [22] aimed to minimize the cost of train operations by constructing a space-timespeed network to optimize the non-cyclic train timetable. For the hybrid cyclic train timetable, Robenek et al. [23] combined the regularity of the cyclic timetable with the flexibility of the non-cyclic timetable to improve passenger satisfaction. Yin et al. [24] constructed a mixed integer programming model based on the periodic event-activity network model to generate a mixed train timetable that meets passenger travel demand.
As the final stage in the compilation of a train operation plan, the rolling stock schedule is mainly addressed from the perspective of the operating company whereby, under the constraint of the fleet size, the rolling stock needs to be positioned in such a way as to meet the timetable scheduling service [25][26][27]. Peeters et al. [28] constructed a mixed integer linear programming model to determine the allocation of vehicles and train operation plan, and used a branch and bound algorithm to solve the problem. Cadarso and Marín [29] established a model for the robust rolling stock by considering train composition, train empty movements, and passenger flow demand. Mahadikar et al. [30] constructed a multi-stage allocation model with the main objective of minimizing the empty movement mileage of trains by considering the capacity of the depot and the demand for the number of vehicles on the train service route. Ucar et al. [31] considered two types of disruptions in the scheduling process of the multidepot vehicle and proposed a unique recovery method to deal with these potential disruptions, and designed a simultaneous column-and-row generation algorithm to find a valid lower bound of the model.
The integrated optimization of each stage in the train operation plan has also attracted the attention of scholars. Aiming at the integrated optimization of line plan and timetable, Kaspi and Raviv [32] sought to integrate the optimization of running line plan and timetable to construct a model to minimize passenger travel time and operating cost. The model was solved using a cross-entropy metaheuristic. Zhang et al. [33] constructed a unified integer linear programming model that coupled the variables of line planning and the variables of train timetabling through a cross-resolution consistency constraint. In terms of the integrated optimization of train timetable and rolling stock schedule, Teng et al. [34] optimized the relation between trains' departure times so as to smooth the vehicle departure intervals and minimize total charging costs. Carosi et al. For comparative convenience, the detailed characteristics of some closely related references are listed in Table 1. Research gaps in existing studies are summarized as follows. Firstly, most of the former works only consider one or two stages of train operation planning. This makes it difficult for the optimization results of the model to guide train running as part of the actual train operation plan. Secondly, in view of the existing line planning, timetabling, and rolling stock scheduling integration optimization research (e.g., Zhou and Mehdi [6], Michaelis and Schöbel [38]), they follow a hypothesis that only the full-length service route exists. When additional service routes are considered, models become intractable. The train operation organization strategy of multiple routes is common and cannot be ignored in the actual operation process of urban rail transit. Finally, existing research especially in the field of rail systems mainly designs service routes whose train composition is pre-determined. Train composition is an important parameter that affects the train capacity and operating cost. The flexible setting of train composition can get a better train operation plan.

Description of the problem
This paper studies the integrated optimization of line planning, timetabling, and rolling stock scheduling within a specified study period in an urban rail transit line. There are two main tracks on the line, each of which is only for the trains running in one direction. To distinguish the directions, trains that run on the upward track are referred to as upward trains, and trains that run in the opposite direction from upward trains are referred to as downward trains. The stations on the line are divided into two categories. The first is the turn-back station where turn-back tracks are built to reverse the running direction of trains. The second type is the ordinary station without turn-back tracks, at which the running direction of trains cannot be reversed. A line usually contains multiple turn-back stations, so there are multiple train service routes. The train service route is composed of two turn-back stations which are used to change the direction of downward trains and upward trains respectively. The service route covering the whole line is defined as the full-length service route. The other service routes that only cover partial stations of the line are defined as short-turn service routes. As the service object of urban rail transit, passenger flow is the main basis for the preparation of train operation plans.
The line plan determines the train service routes, train composition, and frequency of each service route during the study period. Its compilation is mainly affected by passenger flow characteristics and operational rules. The larger the inbound volume, the more trains with large composition will be operated. Short-turn trains usually are operated between turn-back stations with dense passenger flow distribution. The more unbalanced the distribution of passenger flow on the line, the more trains will be operated on short-turn service routes. The train timetable determines the time of arrival and departure at the station for trains that are operated in the line plan. It affects the waiting time of passengers and the rolling stock schedule. Based on timetable, the rolling stock schedule determines the circulation sequence and time of  The number of trains starting from the turn-back station without cycle is the number of rolling stocks required to implement the train operation plan. It is the key to judge whether the train operation plan is feasible. If the number of rolling stocks required for the implementation of the train operation plan exceeds the fleet size, the train operation plan is not implementable. In addition, the number of rolling stocks determines the fixed cost and emergency support capacity of the enterprise. Consequently, reducing the number of rolling stocks used is of great significance to enterprise operation. As for the train operation plan shown in Fig 2, the fourth downward train is taken as the benchmark, and the subsequent downward trains are circulated by upward trains. Therefore, this kind of trains does not need to allocate rolling stock to carry out the transport task. At the same time, three downward trains failed to be circled. Thus, the total number of rolling stocks required in the downward direction is 3. As shown in Fig 2, the total number of rolling stocks required to implement the train operation plan is 6. In addition, the fleet size can be obtained by the number of trains minus the number of train cycles. Taking the train operation plan shown in Fig 2 as an example, the number of trains is 30, and the number of train cycles is 24. Accordingly, the fleet size is 6.
The rolling stock schedule determines the circulation sequence and time of trains at the turn-back stations in the train operation plan. The number of rolling stocks required to execute the train operation plan can be accurately calculated only after the rolling stock schedule is determined. Therefore, it is necessary to optimize the rolling stock schedule in train operation planning. Meanwhile, the rolling stock schedule is affected by the timetable. Keep train service routes, train composition, and the number of trains unchanged, adjust the upward train timetable of the train operation plan shown in Fig 2, that is, let z=0, and get the train operation plan shown in The train operation plan affects both the operating cost of the enterprise and the service level of the passengers. On the one hand, the train operation plan determines the fleet size and train running cost, thereby determining the operating cost. On the other hand, the different train departure intervals of each station have a significant impact on the waiting time of passengers. Therefore, while formulating the operation plan, besides meeting the basic operating rules and passenger flow requirements, the fleet size should be minimized, running cost of trains should be reduced, and the travel time of passengers should be saved. The line plan, timetable, and rolling stock schedule need to consider both the existing fixed facilities and equipment conditions of the line, as well as the need to meet the passenger flow demand during the period, and to do so in such a way as to minimize the operating cost of the enterprise and the travel cost of passengers. The mentioned above is the integrated optimization problem of an urban rail transit train operation plan.

Model hypothesis
• Each service route operates at least one type of composition train.
• Trains of each service route stop at all stations on the service route.
• Trains have the same running time in each section and the same dwell time at each station of the line.
• In the process of passenger flow allocation, they select the earliest train with the remaining capacity that passes through the passenger's origin station and destination station.

Objective function
The operating cost of urban rail transit line mainly includes fixed cost and variable cost. The fixed cost is the total acquisition cost of the rolling stocks used to implement the train operation plan adopted in the line. The variable cost is mainly the total running cost of all the trains

PLOS ONE
Passenger travel time is mainly composed of five parts, including access time, origin/transfer waiting time, in-train time, transfer walking time, and egress time. The access time and egress time are not affected by the train operation plan. In this study, trains are assumed to have the same running time in each section and same dwell time at each station. Hence, different train operation plans make no difference to passengers' in-train time. This paper focuses on the analysis of passengers' waiting time cost. Passenger waiting time refers to the time that passengers need to spend at the origin station and transfer station if they are to complete their journey on the line. This is mainly governed by the train route and arrival time through the passenger origin station and transfer station. The calculation of passenger waiting time cost is shown in Eq 3. The objective function of urban rail transit train operation plan optimization problem is shown in Eq 4. The weight coefficient is set to balance the relative importance of operating cost and passengers' waiting time cost.

Basic operational rules constraints
To ensure the feasibility and reliability of the train operation plan, Eq 5 indicates that each station on the line is covered by at least one service route. Eq 6 assures that the number of service routes adopted by the line is not greater than the maximum allowable number of service routes operated on the considered line. Eq 7 indicates that the number of train compositions should be smaller than the number of maximum compositions allowed to operate by the service route.
To meet the passenger flow demand and maintain a certain operational service level, Eq 8 indicates that the actual transport capacity of the train operation plan should meet the section passenger flow demand under the expected load l. Eq 9 indicates that the number of trains passing through each section of the line should be greater than a e to ensure the quality of operation service, and less than b e to ensure that the passing capacity of each section is not exceeded.
On an urban rail transit line, the required number of rolling stocks in the designed operation plan scheme cannot exceed the available fleet size. That is: The rolling stock circulation constraints To ensure the uniqueness of the circulation between the upward and downward trains, Eq 11 is the circulation uniqueness constraint of the train arriving at the turn-back station. Eq 12 is the circulation uniqueness constraint of the train departing from the turn-back station.
To ensure the reasonability of train circulation at the turn-back station, Eq 13 indicates that the turn-back time of the train at the turn-back station should meet the capacity of turn-back stations, where M 1 is a large enough positive number.

PLOS ONE
Integrated optimization of urban rail transit line planning, timetabling and rolling stock scheduling Eq 14 indicates that if the train f cannot be circulated, the following trains are also not allowed to be circulated.
Passenger boarding constraints Eqs

Variable constraints
The coupling constraints between the variables are as follows: Eq 20 represents the relation between x r and y r,f,m . Trains are allowed to run on the service route r when the service route r is selected. Eq 21 indicates that when the train f is not operated, the following trains are also not allowed to be operated. Eq Eq 23 is the formula of the average train running interval, which is the ratio of the length of the study period to the number of trains.
Eq 24 is the formula for the arrival time of the train f in the downward direction at standard station 1. Eq 25 is the formula for the arrival time of the train f in the upward direction at the standard station |S|.
Eq 26 indicates that the arrival time of train f in downward at station s is equal to the sum of its arrival time at standard station 1 and its travel time from standard station 1 to station s. Similarly, according to Eq 27, the arrival time of train f in upward at the station s can be calculated. Eq 28 indicates that the departure time of the train at the station s is equal to the sum of its arrival time and stop time at the station s. It is worth noting that the arrival and departure time of train at the station is related to the variable y r,f,m . When y r,f,m = 0, that is, train f is not operated, its arrival and departure time at each station is 0.

Analysis of model complexity
The integrated optimization model of urban rail transit train operation plan is an integer nonlinear programming model. The decision variables are divided into two categories. One is binary decision variables such as line plan variables and rolling stock schedule variables. The other is positive integer variables such as timetable variables. The number of the decision variables and constraints in the model is determined by the length of the research period |T|, the number of stations |S|, the number of alternate routes |R|, the maximum number of trains in the study period |F|, the types of train compositions |M|, and the number of passengers |P|. The number of variables and constraints in the model is listed in Table 5. Taking the urban rail transit line with 20 stations and 10 alternative routes as an example, the research period is 2 hours, the maximum number of trains is 80, and the train compositions type is 2. The number of variables and constraints in the model is more than 10 million. In addition, the model also contains some nonlinear parts, such as the objective Eqs 3, 15 and 23, etc. Although the model can be transformed into a linear model through linearization, the scale of variables and constraints will be further increased. Considering the feasibility of the solving time of the model, this paper proposes an efficient deterministic search algorithm based on the characteristics of the problem to ensure the optimal solution of the original problem within a reasonable solving time.

Deterministic search algorithm
The integrated optimization model of train operation plan aims to minimize the operating enterprise cost and passenger waiting time cost, and the optimal value of the objective function of the original problem is denoted as Z*. When the biggest composition and minimum train interval are adopted for train operation plan during the study period, the enterprise operation cost is the maximum, and the passenger waiting time cost is the minimum. The maximum value of Z 12 is denoted as Z max 12 . The LPM can be solved by commercial software, the minimum value is denoted as Z min 12 . Since the LPM can be regarded as a relaxation model of the original problem, the following relation can be obtained, Z min 12 � Z * 12 � Z 12 � Z max 12 . Because the range of the LPM can be reasonably estimated and the LPM sub-model is easy to solve, the optimal solution of the original problem can be obtained by traversing the value range of Z 12 . Based on the above analysis, the line plan sub-model for iteration (LPMI) is established, as shown in Eq 35. Z kÀ 1 12 is the optimal value of the objective function in the k-1 iteration, and θ is the iteration step size. In the iteration process, Z k 12 always increases at least the difference of travel mileage between the second shortest route and the shortest route in all alternative routes. The value of iteration step is shown in Eq 36, and the calculation formula of maximum iteration times k max is shown in Eq 37. minZ 12 s:t: ð5Þ � ð9Þ; ð20Þ � ð22Þ Based on the decomposition models, a deterministic search algorithm with estimable search range and fixed iteration step size is designed in this study. The parameter symbols in the algorithm are listed in Table 6. The specific process of the deterministic search algorithm is shown in Algorithm 1. Driven by the optimization results of the LPMI, the deterministic search algorithm calls the timetable and rolling stock schedule optimization algorithm shown in Algorithm 2 and the passenger flow allocation algorithm shown in Algorithm 3 in turn. Since these are both deterministic algorithms that meet the constraints of their corresponding sub-models, the optimal solution of IOM can be obtained after finite iterations.

Algorithm 1 Deterministic search algorithm.
Input: Line basic data; Passenger data; Output: IOM optimal objective function value Z*; Train operation plan; step 1: Initialize line basic data and iteration step size θ. Set Z* = +1, k = 0. The sub-model LPM is solved by a commercial solver.Record the optimal value Z min 12 . Set Z k 12 ¼ Z min 12 . Calculate Z max 12 and k max ; Table 6. Parameters in algorithms.  step 2: Determine if k = 0, if so, go to Step3. Otherwise, the submodel LPMI is solved by a commercial solver and record the optimal value Z k 12 ; step 3: Based on Z k 12 , the timetable and rolling stock scheduling optimization algorithm shown in Algorithm 2 is called to solve the submodel TRM. Record the optimal value of the sub-model Z k 11 . Determine if Z k 11 ¼ þ1, if so, go to Step5. Otherwise, go to Step4; step 4: Based on Z k 12 , the passenger allocation algorithm shown in Algorithm 3 is called to solve the sub-model PAM. Record the optimal value of the sub-model Z k

Sets and indices
step 5: Determine if k < k max , if so, go to Step2. Otherwise, end the algorithm.

Algorithm 2 Timetabling and rolling stock scheduling optimization algorithm.
Input: Set of trains F; The value of k; Output: TRM optimal objective function valueZ k 11 ; Timetable; Rolling stock schedule; step 1: Set the kth iteration optimal objective function value Z k 11 ¼ þ1, temporary objective function value Z 0 11 = +1, cN = 0, and offset of the departure time of the first train in the upward direction at the standard station z = 0; step 2: Based on F and z, the arrival and departure time of the train at the turn-back station is updated. Statistics DT s and AT s ; step 3: Determine the circulation sequence of trains. The main process is as follows: For

Algorithm 3 Passenger allocation algorithm.
Input: Passenger data; The value of k;Timetable; Rolling stock schedule; Output: PAM optimal objective function value Z k 2 ; step 1: The passenger flow data set P is arranged in ascending order by arrival time oT p . Set f p = −1 and gO p = 0 for all passengers. Set the current simulation time t = 0; step 2: Passengers get on the train. The main process is as follows:  To prove the optimality of the solution of the deterministic search algorithm, the objective function of IOM in the kth iteration is Z k , Z k ¼ Z k 11 þZ k 12 þZ k 2 . The optimal solution of the IOM is Z*, the set of decision variables is X, Z* = minZ(X). The result of the deterministic search algorithm solution is Z 0 . According to the above TPM problem analysis, Z k 12 2 ½Z min 12 ; Z max 12 �. When k = i, Z i 12 ¼ Z min 12 þ ði À 1Þ � y. Algorithm 2 derives Z i 11 ¼ minZ i 11 ðzÞ by enumerating the offset of departure time z. Algorithm 3 calculates Z i 2 by enumerating passenger p.
According to Algorithm 1, Z 0 = min{Z 1 , � � �, Z i }; Similarly, when k = k max , In essence, the deterministic search algorithm takes the direction of Z k 12 increasing as the search direction, and discretely enumerates all possible train operation plans through the determined step size θ. Hence, minfZ 1 ; � � � ; Z i ; � � � ; Z k max g is equal to minZ(X). Z* = Z 0 , that is, the proposed algorithm can find the optimal solution of the IOM.

Case description
The experiments reported in this section are based on the operation of the Chongqing Metro Line 3 in China, which is 54 km long, with 39 stations and 38 sections. There are seven optional turn-back stations, among which s 1 , s 8 , and s 14 only permit the upward arriving train to turn back. Meanwhile, s 24 , s 28 , s 35 and s 39 only allow the downward arriving train to turn back. The capacity of turn-back stations in each direction is listed in Table 7. It is stipulated that the standard station for downward trains is s 1 , and the standard station for upward trains is s 39 . There are twelve feasible alternative routes, which are detailed in Table 8. There are currently two types of train compositions operated on the line, namely six-car and eight-car trains. The relevant parameters of train compositions are described in Table 9. The values of other parameters of the model are listed in Table 10. The passenger flow data from 07:00-09:00 during the morning peak period on December 6, 2021 (a working day) is selected to optimize the train operation plan. The distribution of OD passenger flow on the line during the study period is shown in Fig 4. Model optimization results were obtained on a personal computer with Intel Core i7-8550 1.8 GHz CPU and 16 GB memory.

PLOS ONE
Integrated optimization of urban rail transit line planning, timetabling and rolling stock scheduling

Outcome analysis
Based on the above data and parameter settings, the C# programming language is used to implement the algorithm. According to the Eq 36, the iteration step θ is set to 1200, and after 124 iterations, the deterministic algorithm terminates. The algorithm takes 896.21s in total. Compared with the heuristic algorithm proposed in the relevant literature [5,6], the deterministic search algorithm can effectively reduce the number of iterations of the search through the determined step size, thus improving the solving efficiency. At the same time, the deterministic algorithm is driven by the linear sub-model LPMI to ensure the optimization of the solution results. The validity of the proposed model is proved by comparing the differences between the model optimization results (MOR) and the manual compilation result (MCR) based on experience in actual operation from the three components of line plan, timetable, and rolling stock schedule. Quality analysis of line planning result. Fig 5 shows the comparison of line planning results during the study period. The figure indicates the number of pairs of trains on each route within two hours. As shown in Fig 5(a), MCR adopts three service routes of s 1 -s 39 , s 8 -s 28 , and s 14 -s 39 , among which the s 8 -s 28 operates eight-car trains. The ratio of trains running on the service routes is 1:2:1, with an average running interval of 150 s. In contrast, as shown in Fig 5  (b), MOR adopts three service routes of s 1 -s 39 , s 8 -s 28 , and s 14 -s 28 , among which the s 8 -s 28 and s 14 -s 28 operate eight-car trains. The average running interval of the trains is 205 s. The comparison of transport capacity and passenger demand matching is shown in Fig 6. The MCR cannot meet the passenger demand of section e 7 , and there is a waste of transport capacity from section e 8 to e 28 . MOR solves the problem of tight transport capacity in section e 7 by increasing the number of trains running on the service route s 1 -s 39 . At the same time, MOR selects the service route s 14 -s 28 , and fully reduces the waste of transport capacity from section e 8 to e 28 by adopting the operation mode of large-composition trains and long-running intervals. The

PLOS ONE
mean section load factor during the study period is shown in Fig 7, of which the maximum section load factor during the MCR period is 109.44%, and the minimum section load factor is 9.27%. The MOR has a maximum section load factor of 94.31% and a minimum section load factor of 14.83%, which has a better load factor stability than that of MCR.
Timetabling and rolling stock scheduling quality analysis. As shown in Figs 8 and 9, the timetable and the train rolling stock schedule in the study period are compared and displayed in the form of train diagram. The first upward train offset of MCR is 555 s, and the first upward train offset of MOR is 105 s according to calculation. Affected by the long line mileage, in the MCR, the upward trains ending at station s 1 cannot be circulated within the period, making the entry and exit depots of subsequent trains more complicated. In addition, the running time of MOR's is generally higher than that of MCR at the turn-back station. In the actual operation process, under the condition of not increasing the fleet size and meeting the constraints of the turn-back station, the longer the running time at the turn-back station, the more time is left for the train turn-back running and passengers to get on and off the train. This makes the MOR train operation plan more robust than MCR. The fleet size required for the turn-back station can be counted by the number of trains arriving and departing at the turnback station and the number of circulations. The detailed comparison of train circulation at the turn-back station is listed in Table 11. The fleet size required by MOR is thirteen lower than that of MCR, delivering fixed cost reduction and efficiency improvements while meeting the demand for passenger flow.
Model optimization quality analysis. The detailed comparison of the objective function values of each part is shown in Table 12. Due to the large number of trains in MCR and the small interval between trains, the average waiting time for passengers is 117s. Compared with MCR, the passenger waiting time of MOR is 145s, which is 28s longer. However, MOR's enterprise fixed cost and variable cost decrease more, and the comprehensive objective function expense decreases by 13%. In addition, MOR can not only meet the demand for passenger flow, but also greatly reduce the number of rolling stocks in use. The saved rolling stocks can be used to perform special transportation tasks such as express trains and cross-line trains, so as to improve the passenger service level of the network, but this part of the benefit can not be directly reflected in the comparison of the objective function value. To sum up, the optimization method proposed in this paper can carry out integrated optimization across the line planning, timetabling, and rolling stock scheduling considering the facilities and equipment conditions of urban rail transit lines and the characteristics of passenger flow, and in doing so it can deliver better outcomes than those of the empirical method in actual production.

Sensitivity analysis
Fleet size. To explore the influence of the fleet size on the design of the train operation plan, based on the rolling stock of the optimal train operation plan, MOR, the number of sixcar rolling stock and eight-car rolling stock were increased or decreased respectively, as shown in Table 13. Five groups of optimized train operation plans were solved and observed under different fleet sizes. Train operation plans with serial numbers 1 and 2 revealed that although the plan utilized a smaller fleet size than the original problem, they could still support the delivery of the train operation plan. Compared with train operation plan 2, train operation plan 3 increases the number of eight-car rolling stock and reduces the number of six-car rolling

PLOS ONE
stock. The optimized train operation plan increases the number of eight-car rolling stock and reduces the six-car rolling stock. Contrary to train operation plan 3, train operation plan 4 reduces the number of eight-car rolling stock and increases the number of six-car rolling stock. The optimized train operation plan reduces the number of eight-car rolling stock and increases the number of six-car rolling stock. Train operation plans 3 and 4 show that when any train composition's fleet size in the train operation plan is lower than the demand for the fleet size in the optimal train operation plan, the model will adjust the optimal result to adapt to the current fleet size. Train operation plan 5 shows that when the fleet size used in the train operation plan cannot meet the basic passenger flow demand, there is no feasible train operation plan.
The maximum allowable number of routes. The maximum number of routes allowed to operate on the line is an important parameter that affects the train operation plan. In this paper, the value of η is set from 1 to 5, and the corresponding model is solved. The calculation results are described in Table 14. As can be seen from Table 14, while the optimization results of the model are the same when η � 3, the total cost gradually rises as the maximum allowable number of routes operated on the line is reduced. When η becomes smaller, the travel interval at some stations becomes smaller too. Although the passenger service level is improved, the  operating cost of enterprises will increase even more, which will lead to an increase in the total cost. When η is 1, that is, when the line adopts the full-length service route, the model cannot find the feasible boundary due to insufficient fleet size. Weight coefficient. The setting of the weight coefficient τ can effectively balance the cost of enterprise operation and passenger waiting time. In this research, the value of τ is set from 0.1 to 0.9, and each model is solved. The solution results are shown in Fig 10. The operating cost of the enterprise and the cost of passenger waiting time conflict with each other. When the value of τ is equal to 0.1, the enterprise operating cost reaches the minimum value, and the passenger travel cost reaches the maximum value. With the increase of τ, the cost of the enterprise operation gradually increases, while the cost of passengers' waiting time gradually decreases, reaching their maximum and minimum values, when the value of τ is equal to 0.9. Influenced by the preparation of the train operation plan in the actual operation of the enterprise, this paper sets τ to 0.6.

Conclusion
This research takes passenger flow demand and line fixed facilities and equipment conditions as input, and studies the integrated optimization problem of urban rail transit train operation plans. An integer nonlinear programming model was established to minimize the cost of enterprise operation and passenger waiting time. The model was decomposed and a deterministic algorithm was designed to realize the collaborative optimization of line planning, timetabling, and rolling stock scheduling. Computational analysis shows that this integrated optimization model can better reduce the operating cost of enterprises compared with the train operation plan prepared by stages based on manual experience. The fixed cost can be reduced by 24%, the variable cost can be reduced by 23%, and the total cost can be reduced by 13%. Although passenger waiting time increases in the integrated optimization model, it can deliver a more reasonable train capacity allocation according to the distribution characteristics of the line passenger flow. The maximum section load factor decreased from 109.44% to 94.31%, and the minimum section load factor increased from 9.27% to 14.83%, which improves the passenger service level of the train operation plan. At the same time, the model comprehensively considered the line planning, timetable, and rolling stock schedule. Therefore, it can accurately calculate the fleet size, making the model optimization results easier for operators to implement. It is worth noting that, although the model does not explicitly involve constraints on the proportion of trains running between routes, the resulting optimized train operation plan tends to be periodic to ensure the successful circulation between trains within the period as much as possible, as well as to reduce the fleet size and the running kilometrage of trains. This periodicity is in line with the actual production demand and it also serves to make the optimized train operation plan more reasonable. This paper mainly studies the integration of urban rail transit operation plans during peak hours when passenger flow fluctuation is small. In the next step, it is necessary to explore the integration of train operation plans for the large fluctuation of passenger flow during the transition period between off-peak hours and peak hours.